package com.ruicar.afs.cloud.demo.demo.batch;

import cn.hutool.core.thread.ThreadUtil;
import com.ruicar.afs.cloud.batch.frame.AbsBatchRunner;
import com.ruicar.afs.cloud.common.core.exception.AfsBaseException;

import java.sql.Connection;
import java.util.Random;
import java.util.concurrent.TimeUnit;

public class DemoBatch extends AbsBatchRunner {
    @Override
    public void process(String param) {
//        Connection connection = this.getConnection();
//        Random random = new Random();
//        ThreadUtil.sleep(10, TimeUnit.SECONDS);
//        if(random.nextBoolean()){
//            throw new AfsBaseException("异常");
//        }
//        logger.info("读取==={}",loadBreakPoint());
//        saveBreakPoint("断点.......");
//        logger.info("{}",param);
//        logger.info("run 执行========={}-{}-{}",this.getSystemName(),this.getBatchNo(),this.getStepNo());
//        logger.info("{}",connection);
//        logger.info("读取==={}",loadBreakPoint());
//        ThreadUtil.sleep(100, TimeUnit.SECONDS);
    }
}
